<template>
	<view class="tui-set-box">
		<tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(1)">
			<view class="tui-list-cell tui-info-box">
				<image :src="userinfo.headpic || '/static/images/missing-face.png'" class="avatar"></image>
				<view><text class="username">{{userinfo.nickname || '游客'}}</text></view>
			</view>
		</tui-list-cell>
		
		<view class="tui-mtop">
			<tui-list-cell padding="0" :lineLeft="false" :arrow="true" @click="href(3)">
				<view class="tui-list-cell">
					设置
				</view>
			</tui-list-cell>
			
		</view>
		
	</view>
</template>
<script>
	var _self;
	import tuiListCell from '@/components/tui/tui-list-cell';
	
	import tuiIcon from "@/components/tui/tui-icon"
	
	let startY = 0,
		moveY = 0,
		pageAtTop = true;
	export default {
		components: {
			tuiIcon,
			tuiListCell
		},
		data() {
			return {
				is_num: false,
				userinfo: '',
				userList:[],
				myInfo:'',
				coverTransform: 'translateY(0px)',
				coverTransition: '0s',
				moving: false,
				getimg: this.$getimg,
				maskState:0,
				vipInfo:[],
				config:[],
				vip:0,
				order_total:[],
				is_mobile:false
			}
		},
		watch: {
			// is_num() {
			// 	_self.load()
			// }
		},
		async onLoad() {
			_self=this;
		
			
			this.config = uni.getStorageSync('config')
		},
		
		onShow() {
				let token = uni.getStorageSync('token');
				
				let my =uni.getStorageSync('my')
				if(my && token){
					this.myInfo = my.data
					this.userinfo = my.data
				}
				
				
			},
	
		computed: {

			
		},
		methods: {
			
			href(page) {
				
				let url = "";
				switch (page) {
					
					case 3:
						url = "/pages/user/account/account"
						break;
							
					default:
						break;
				}
				uni.navigateTo({
					url: url
				})
				
			}
			}
			
			
	}
</script>
<style lang='scss'>
	.tui-set-box {
		padding-bottom: 20rpx;
		color: #333;
	}
	
	.tui-list-cell {
		display: flex;
		align-items: center;
		padding: 24rpx 30rpx;
		font-size: 30rpx;
	}
	
	.tui-info-box {
		font-size: 34rpx;
	}
	
	.avatar {
		width: 140rpx;
		height: 140rpx;
		margin-right: 20rpx;
		border: 5upx solid #fff;
		border-radius: 50%;
	}
	
	.tui-mtop {
		margin-top: 20rpx;
	}
	
	.tui-exit {
		padding: 100rpx 24rpx;
	}
</style>